import config from "@/config"
import http from "@/utils/request"

export default {
	//销售单
	contract:{
		list: {
			url: `${config.API_URL}/adminapi/shop.contract_order/lists`,
			name: "获取销售单列表",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
        listExport:{
            url: `${config.API_URL}/adminapi/shop.contract_order/exportListDetail`,
			name: "销售单导出",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
        },
		edit: {
			url: `${config.API_URL}/adminapi/shop.contract_order/edit`,
			name: "修改销售单",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/shop.contract_order/add`,
			name: "添加销售单",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/shop.contract_order/delete`,
			name: "删除销售单",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		detail: {
			url: `${config.API_URL}/adminapi/shop.contract_order/detail`,
			name: "销售单详情",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
        getallproduct:{
            url: `${config.API_URL}/adminapi/shop.shop_goods/getAllSellProducts`,
			name: "获取原材料与产品型号",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
        },
        getproduct:{
            url: `${config.API_URL}/adminapi/shop.shop_goods/getSellProductLists`,
			name: "获取产品下的速比/法兰/颜色",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
        },
        getmater:{
            url: `${config.API_URL}/adminapi/shop.shop_goods/getMaterialColor`,
			name: "获取原材料的颜色颜色",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
        },
        getprice:{
            url: `${config.API_URL}/adminapi/shop.shop_goods/getProductSellPrice`,
			name: "获取销售产品销售价",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
        },
        mater:{
            url: `${config.API_URL}/adminapi/shop.contract_order/getProductMaterial`,
			name: "报料单",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
        },
        materExport:{
            url: `${config.API_URL}/adminapi/shop.contract_order/exportProductMaterial`,
			name: "报料单导出",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
        },
        getAllGoods:{
            url: `${config.API_URL}/adminapi/shop.contract_order/getOrderProductByIds`,
			name: "获取所有销售单的产品",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
        },
        check: {
			url: `${config.API_URL}/adminapi/shop.contract_order/checkStatus`,
			name: "销售单 审核",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        uncheck: {
			url: `${config.API_URL}/adminapi/shop.contract_order/uncheckStatus`,
			name: "销售单 反审核",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        import: {
			url: `${config.API_URL}/adminapi/shop.contract_order/importOrder`,
			name: "销售单导入",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
	},
}
